package com.rd.student.jiaji.class3.xumingze;

import java.util.LinkedList;
import java.util.Scanner;

public class AgeFind
{
        Scanner aa = new Scanner(System.in);
        int type = aa.nextInt();
        public void ageFd(LinkedList list,int type)
        {
            int j=0;
            for (int i=0;i<list.size();i++)
            {
                Student student=(Student) list.get(i);
                if (type==student.getAge())
                {
                    System.out.println(list.get(i));
                    j++;
                }
            }
            System.out.println(type+"岁有"+j+"人");
        }
}

